package com.yunao.service;

import com.yunao.commons.serachcore.core.bean.Articles;
import com.yunao.entity.ArticleItem;
import com.yunao.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Date;
import java.util.List;

public interface ArticleService {

    Articles seachByids(String ids);

    ArticleItem findOne(Integer articleId);

    void deleteById(Integer articleId);

    void deleteByIds(String articleIds);

    List<ArticleItem> findAllById(String ids);

    List<ArticleItem> findByUserAndType(Integer userId, Integer type);

    Page<ArticleItem> findByQuery(Integer userId, Integer type, Date date, String word, Pageable pageable);

    List<ArticleItem> findByWord(String word);

//    Page<ArticleItem> findByDate(Integer userid,Integer type,Date date, Pageable pageable);

    Page<ArticleItem> findAlarms(Integer userid, Integer type, String word, Date numday, Date day, Integer subjectId, Pageable pageable);

    Page<ArticleItem> getArticleItems(Integer userid, Integer type, Pageable pageable);

    void save(Articles articles, User userOutput);

    List<ArticleItem> findBySubject(Integer subjectId);
}
